#include "stdafx.h"
#include "KeyboardHandler.h"

CKeyboardHandler::CKeyboardHandler( ) :
	m_Key( 0 ),
	m_SpecialKey( 0 ),
	m_PosX( 0 ),
	m_PosY( 0 )
{
}

CKeyboardHandler::~CKeyboardHandler( )
{

}

bool CKeyboardHandler::Update( )
{
	return true;
}

void CKeyboardHandler::Clear( )
{
	m_Key = 0;
	m_SpecialKey = 0;
	m_PosX = 0;
	m_PosY = 0;
}

bool CKeyboardHandler::HandleKeyboard( const unsigned char inKey, const int inPosX, const int inPosY )
{
	m_Key = inKey;
	m_PosX = inPosX;
	m_PosY = inPosY;
	printf( "Keyboard : Key = %c Pos X = %d Pos Y = %d\n", m_Key, m_PosX, m_PosY );
	
	return true;
}

bool CKeyboardHandler::HandleSpecialKey( const int inKey, const int inPosX, const int inPosY )
{
	m_SpecialKey = inKey;
	m_PosX = inPosX;
	m_PosY = inPosY;
	printf( "Special Keyboard : Key = %d Pos X = %d Pos Y = %d\n", m_SpecialKey, m_PosX, m_PosY );

	return true;
}